package mvc.model.inventory

import org.json.JSONObject

class ClearGoodsType(
    val name: String,
    val goodsTypeName: String,
    val number: Int,
    val pastdue: String
) {
    companion object {
        fun withJson(json: JSONObject): ClearGoodsType {
            val name = json.getString("waresName")
            val goodsTypeName = json.getString("cargoDatan")
            val number = json.getInt("clearData")
            val pastdue = json.getString("isPastdue")
            return ClearGoodsType(name, goodsTypeName, number, pastdue)
        }
    }
}